/**
 ******************************************************************************
 * @FilePath: \Hero\App\Mode_SW.h
 * @Brief: 
 * @Date: 2021-04-18 15:35:55
 * @Author: Rio
 ******************************************************************************
 */
#ifndef __MODE_SW__
#define __MODE_SW
#include "main.h"

typedef enum
{
	INITIALIZING = 0,
	WELL_PROCESSING,
	WAENING,
}sysState_m;

typedef enum
{
	G_MANUAL = 0,
	G_VISION = 1,
	G_ENCODE = 2,
	G_HAlf_VISION = 3,
  G_NULL,
}aimingMode_m;

typedef enum
{
	C_ROTATE = 0,
	C_SWING = 1,
  C_CLAW = 2,
	C_FOLLOW = 3,
	C_FOLLOW_BACK = 4,
	C_NULL,
}chassisMove_m;

typedef enum
{
	S_STOP = 0,
	S_NORMAL = 1,
	S_NULL,
}shootMode_m;

typedef struct
{
	volatile sysState_m e_roboState;
	volatile chassisMove_m e_chassisMode;
	volatile shootMode_m e_shootMode;
	volatile int shootOnce;
	volatile int turnBack;
	volatile aimingMode_m e_aimingMode;
	volatile enum freq
	{
		S_LOW_FREQUENCY = 1200,
		S_MID_FREQUENCY = 800,
		S_HIGH_FREQUENCY = 10,
	}freq;
}roboSetting_t;

extern roboSetting_t roboSet;
void ModeInit(void);
void ModeSwitch(void);

#endif

